package ${entityPackage};

import org.ligson.fwc.core.entity.BasicEntity;
import lombok.Data;
import java.io.Serializable;
<#list tableInfo.columnInfos as columnInfo>
<#if !columnInfo.javaType.name?starts_with("java.lang")>
import ${columnInfo.javaType.name};
</#if>
</#list>

/***
 * ${((tableInfo.remark)?length>0)?string(tableInfo.remark,tableInfo.tableName)}
 */
@Data
public class ${entityName} extends BasicEntity implements Serializable {
<#list tableInfo.columnInfos as columnInfo>

${"    "}/***
${"     "}* ${((columnInfo.remark)?length>0)?string(columnInfo.remark,columnInfo.javaName)}
${"     "}*/
${"    "}private ${columnInfo.javaType.simpleName} ${columnInfo.javaName};
</#list>

<#if tableInfo.primaryKey.javaName != "id">
${"    "}/***
${"     "}* 主键字段
${"     "}*
${"     "}* @return 主键名
${"     "}*/
${"    "}public String primaryKey() {
${"        "}return "${tableInfo.primaryKey.javaName}";
${"    "}}
</#if>

<#if tableInfo.primaryKey.javaType.simpleName != "BigInteger">
${"    "}/***
${"     "}* 主键类型
${"     "}*
${"     "}* @return 主键类型
${"     "}*/
${"    "}@Override
${"    "}public Class primaryKeyType() {
${"        "}return ${tableInfo.primaryKey.javaType.simpleName}.class;
${"    "}}
</#if>
${"    "}//<!--用户自定义代码开始-->
${userCustomCode}
${"    "}//<!--用户自定义代码结束-->
}
